#include "Direction.hpp"

namespace sl
{
	Direction::Direction() : myDirection(Direction::Up)
	{}

	Direction::Direction(Direction::Dir dir) : myDirection(dir)
	{}

	Direction* Direction::SetDirection(Direction::Dir dir)
	{
		myDirection = dir;
		return this;
	}

	Direction::Dir Direction::GetDirection()
	{
		return myDirection;
	}

	std::string Direction::ToString(Direction::Dir dir)
	{
		return luabind::call_function<std::string>(luabind::globals((*Lua)())["sl"]["EnumToString"], luabind::globals((*Lua)())["sl"]["Direction"], dir);
	}
}